package org.dce.screencapturer.objects;

import java.awt.Rectangle;
import java.awt.Shape;

import org.dce.screencapturer.actions.drawing.InsertObjectAction;
import org.dce.screencapturer.util.IconFactory;

@SuppressWarnings("serial")
public class Text extends RegularShapeObject {
	
	public static final class InsertAction extends InsertObjectAction {
		public InsertAction(){
			super("actions.text",IconFactory.getIcon("/images/text.png"), null,Text.class);
		}
	};

	public Text(){
		setText("Write text here");
	}
	
	@Override
	public boolean contains(int x, int y) {
		return x >= 0 && x<= getWidth()
			&& y >= 0 && y<= getHeight();
	}
	
	protected Rectangle calculateInnerBounds(Shape shape) {
		return new Rectangle(0,0,getWidth(),getHeight());
	}
	
	@Override
	protected Shape getShape() {
		return null;
	}
	
	protected boolean supportsText(){
		return true;
	}

}
